<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <h1>打开控制台看输出</h1>
    <script>
      // JavaScript 不能声明类型，所有类型都【不能】书写
      let name = "itheima";
      let age = 18;

      // 数组，对象 都可以直接通过 console.log()打印，比较方便。
      console.log({ name: name, age: age });

      const companyName = "黑马程序员";
      console.log(`公司名称：${companyName}`);

      // JS对象不能写类型
      let person = { name: "小红", age: 18, gender: "woman" };

      // JS数组也不能写类型
      let students = [
        { name: "小红", age: 18, gender: "woman" },
        { name: "小明", age: 19, gender: "man" },
        { name: "小强", age: 18, gender: "woman" },
      ];

      console.log("对象输出", person);
      console.log("数组输出", students);
    </script>
  </body>
</html>
